/**
 * Created by Administrator on 2016/3/25.
 */
;
(function ($) {

    var _firefox = function () {
        return /firefox/.test(navigator.userAgent.toLowerCase());
    };

    var _webkit = function () {
        return /webkit/.test(navigator.userAgent.toLowerCase());
    };

    var _opera = function () {
        return /opera/.test(navigator.userAgent.toLowerCase());
    };

    var _msie = function () {
        return /msie/.test(navigator.userAgent.toLowerCase());
    };

    var _chrome = function () {
        return /chrome/.test(navigator.userAgent.toLowerCase());
    };

    var _safari = function () {
        return /safari/.test(navigator.userAgent.toLowerCase());
    };

    var _baidu = function () {
        return /bidubrowser/.test(navigator.userAgent.toLowerCase());
    };

    $.extend({
        brow: {
            mozilla: _firefox() && !_chrome() && !_msie(),
            webkit: _webkit(),
            opera: _opera(),
            msie: _msie(),
            chrome: _chrome(),
            safari: _safari() && !_chrome(),
            baidu:_baidu() && _chrome() && _safari()
        }
    });

})(jQuery);
